home *** CD-ROM | disk | FTP | other *** search
/ Cream of the Crop 21 / Cream of the Crop 21 (Terry Blount) (October 1996).iso / doom / qplus10.zip / KNIGHT.QC < prev    next >
Text File  |  1996-07-31  |  10KB  |  287 lines

  1. /*
  2. ==============================================================================
  3.  
  4. KNIGHT
  5.  
  6. ==============================================================================
  7. */
  8.  
  9. $cd /raid/quake/id1/models/knight
  10. $origin 0 0 24
  11. $base base
  12. $skin badass3
  13.  
  14. $frame stand1 stand2 stand3 stand4 stand5 stand6 stand7 stand8 stand9
  15.  
  16. $frame runb1 runb2 runb3 runb4 runb5 runb6 runb7 runb8
  17.  
  18. //frame runc1 runc2 runc3 runc4 runc5 runc6
  19.  
  20. $frame runattack1 runattack2 runattack3 runattack4 runattack5
  21. $frame runattack6 runattack7 runattack8 runattack9 runattack10
  22. $frame runattack11
  23.  
  24. $frame pain1 pain2 pain3
  25.  
  26. $frame painb1 painb2 painb3 painb4 painb5 painb6 painb7 painb8 painb9
  27. $frame painb10 painb11
  28.  
  29. //frame attack1 attack2 attack3 attack4 attack5 attack6 attack7
  30. //frame attack8 attack9 attack10 attack11
  31.  
  32. $frame attackb1 attackb1 attackb2 attackb3 attackb4 attackb5
  33. $frame attackb6 attackb7 attackb8 attackb9 attackb10
  34.  
  35. $frame walk1 walk2 walk3 walk4 walk5 walk6 walk7 walk8 walk9
  36. $frame walk10 walk11 walk12 walk13 walk14
  37.  
  38. $frame kneel1 kneel2 kneel3 kneel4 kneel5
  39.  
  40. $frame standing2 standing3 standing4 standing5
  41.  
  42. $frame death1 death2 death3 death4 death5 death6 death7 death8
  43. $frame death9 death10
  44.  
  45. $frame deathb1 deathb2 deathb3 deathb4 deathb5 deathb6 deathb7 deathb8
  46. $frame deathb9 deathb10 deathb11
  47.  
  48. void()    knight_stand1    =[    $stand1,    knight_stand2    ] {ai_stand();};
  49. void()    knight_stand2    =[    $stand2,    knight_stand3    ] {ai_stand();};
  50. void()    knight_stand3    =[    $stand3,    knight_stand4    ] {ai_stand();};
  51. void()    knight_stand4    =[    $stand4,    knight_stand5    ] {ai_stand();};
  52. void()    knight_stand5    =[    $stand5,    knight_stand6    ] {ai_stand();};
  53. void()    knight_stand6    =[    $stand6,    knight_stand7    ] {ai_stand();};
  54. void()    knight_stand7    =[    $stand7,    knight_stand8    ] {ai_stand();};
  55. void()    knight_stand8    =[    $stand8,    knight_stand9    ] {ai_stand();};
  56. void()    knight_stand9    =[    $stand9,    knight_stand1    ] {ai_stand();};
  57.  
  58. void()    knight_walk1    =[    $walk1,        knight_walk2    ] {
  59. if (random() < 0.2)
  60.     sound (self, CHAN_VOICE, "knight/idle.wav", 1,  ATTN_IDLE);
  61. ai_walk(3);};
  62. void()    knight_walk2    =[    $walk2,        knight_walk3    ] {ai_walk(2);};
  63. void()    knight_walk3    =[    $walk3,        knight_walk4    ] {ai_walk(3);};
  64. void()    knight_walk4    =[    $walk4,        knight_walk5    ] {ai_walk(4);};
  65. void()    knight_walk5    =[    $walk5,        knight_walk6    ] {ai_walk(3);};
  66. void()    knight_walk6    =[    $walk6,        knight_walk7    ] {ai_walk(3);};
  67. void()    knight_walk7    =[    $walk7,        knight_walk8    ] {ai_walk(3);};
  68. void()    knight_walk8    =[    $walk8,        knight_walk9    ] {ai_walk(4);};
  69. void()    knight_walk9    =[    $walk9,        knight_walk10    ] {ai_walk(3);};
  70. void()    knight_walk10    =[    $walk10,    knight_walk11    ] {ai_walk(3);};
  71. void()    knight_walk11    =[    $walk11,    knight_walk12    ] {ai_walk(2);};
  72. void()    knight_walk12    =[    $walk12,    knight_walk13    ] {ai_walk(3);};
  73. void()    knight_walk13    =[    $walk13,    knight_walk14    ] {ai_walk(4);};
  74. void()    knight_walk14    =[    $walk14,    knight_walk1    ] {ai_walk(3);};
  75.  
  76.  
  77. void()    knight_run1    =[    $runb1,        knight_run2    ] {
  78. if (random() < 0.2)
  79.     sound (self, CHAN_VOICE, "knight/idle.wav", 1,  ATTN_IDLE);
  80. ai_run(16);};
  81. void()    knight_run2    =[    $runb2,        knight_run3    ] {ai_run(20);};
  82. void()    knight_run3    =[    $runb3,        knight_run4    ] {ai_run(13);};
  83. void()    knight_run4    =[    $runb4,        knight_run5    ] {ai_run(7);};
  84. void()    knight_run5    =[    $runb5,        knight_run6    ] {ai_run(16);};
  85. void()    knight_run6    =[    $runb6,        knight_run7    ] {ai_run(20);};
  86. void()    knight_run7    =[    $runb7,        knight_run8    ] {ai_run(14);};
  87. void()    knight_run8    =[    $runb8,        knight_run1    ] {ai_run(6);};
  88.  
  89.  
  90. void()    knight_runatk1    =[    $runattack1,        knight_runatk2    ]
  91. {
  92. if (random() > 0.5)
  93.     sound (self, CHAN_WEAPON, "knight/sword2.wav", 1, ATTN_NORM);
  94. else
  95.     sound (self, CHAN_WEAPON, "knight/sword1.wav", 1, ATTN_NORM);
  96. ai_charge(20);
  97. };
  98. void()    knight_runatk2    =[    $runattack2,    knight_runatk3    ] {ai_charge_side();};
  99. void()    knight_runatk3    =[    $runattack3,    knight_runatk4    ] {ai_charge_side();};
  100. void()    knight_runatk4    =[    $runattack4,    knight_runatk5    ] {ai_charge_side();};
  101. void()    knight_runatk5    =[    $runattack5,    knight_runatk6    ] {ai_melee_side();};
  102. void()    knight_runatk6    =[    $runattack6,    knight_runatk7    ] {ai_melee_side();};
  103. void()    knight_runatk7    =[    $runattack7,    knight_runatk8    ] {ai_melee_side();};
  104. void()    knight_runatk8    =[    $runattack8,    knight_runatk9    ] {ai_melee_side();};
  105. void()    knight_runatk9    =[    $runattack9,    knight_runatk10    ] {ai_melee_side();};
  106. void()    knight_runatk10    =[    $runattack10,    knight_runatk11    ] {ai_charge_side();};
  107. void()    knight_runatk11    =[    $runattack11,    knight_run1    ] {ai_charge(10);};
  108.  
  109. void()    knight_atk1    =[    $attackb1,        knight_atk2    ]
  110. {
  111. sound (self, CHAN_WEAPON, "knight/sword1.wav", 1, ATTN_NORM);
  112. ai_charge(0);};
  113. void()    knight_atk2    =[    $attackb2,        knight_atk3    ] {ai_charge(7);};
  114. void()    knight_atk3    =[    $attackb3,        knight_atk4    ] {ai_charge(4);};
  115. void()    knight_atk4    =[    $attackb4,        knight_atk5    ] {ai_charge(0);};
  116. void()    knight_atk5    =[    $attackb5,        knight_atk6    ] {ai_charge(3);};
  117. void()    knight_atk6    =[    $attackb6,        knight_atk7    ] {ai_charge(4); ai_melee();};
  118. void()    knight_atk7    =[    $attackb7,        knight_atk8    ] {ai_charge(1); ai_melee();};
  119. void()    knight_atk8    =[    $attackb8,        knight_atk9    ] {ai_charge(3);
  120. ai_melee();};
  121. void()    knight_atk9    =[    $attackb9,        knight_atk10] {ai_charge(1);};
  122. void()    knight_atk10=[    $attackb10,        knight_run1    ] {ai_charge(5);};
  123.  
  124. //void()    knight_atk9    =[    $attack9,        knight_atk10    ] {};
  125. //void()    knight_atk10    =[    $attack10,        knight_atk11    ] {};
  126. //void()    knight_atk11    =[    $attack11,        knight_run1    ] {};
  127.  
  128. //===========================================================================
  129.  
  130. void()    knight_pain1    =[    $pain1,        knight_pain2    ] {};
  131. void()    knight_pain2    =[    $pain2,        knight_pain3    ] {};
  132. void()    knight_pain3    =[    $pain3,        knight_run1    ] {};
  133.  
  134. void()    knight_painb1    =[    $painb1,    knight_painb2    ] {ai_painforward(0);};
  135. void()    knight_painb2    =[    $painb2,    knight_painb3    ] {ai_painforward(3);};
  136. void()    knight_painb3    =[    $painb3,    knight_painb4    ] {};
  137. void()    knight_painb4    =[    $painb4,    knight_painb5    ] {};
  138. void()    knight_painb5    =[    $painb5,    knight_painb6    ] {ai_painforward(2);};
  139. void()    knight_painb6    =[    $painb6,    knight_painb7    ] {ai_painforward(4);};
  140. void()    knight_painb7    =[    $painb7,    knight_painb8    ] {ai_painforward(2);};
  141. void()    knight_painb8    =[    $painb8,    knight_painb9    ] {ai_painforward(5);};
  142. void()    knight_painb9    =[    $painb9,    knight_painb10    ] {ai_painforward(5);};
  143. void()    knight_painb10    =[    $painb10,    knight_painb11    ] {ai_painforward(0);};
  144. void()    knight_painb11    =[    $painb11,    knight_run1    ] {};
  145.  
  146. void(entity attacker, float damage)    knight_pain =
  147. {
  148.     local float r;
  149.  
  150.     if (self.pain_finished > time)
  151.         return;
  152.  
  153.     r = random();
  154.     
  155.     sound (self, CHAN_VOICE, "knight/khurt.wav", 1, ATTN_NORM);
  156.     if (r < 0.85)
  157.     {
  158.         knight_pain1 ();
  159.         self.pain_finished = time + 1;
  160.     }
  161.     else
  162.     {
  163.         knight_painb1 ();
  164.         self.pain_finished = time + 1;
  165.     }
  166.     
  167. };
  168.  
  169. //===========================================================================
  170.  
  171. void()    knight_bow1    =[    $kneel1,        knight_bow2    ] {ai_turn();};
  172. void()    knight_bow2    =[    $kneel2,        knight_bow3    ] {ai_turn();};
  173. void()    knight_bow3    =[    $kneel3,        knight_bow4    ] {ai_turn();};
  174. void()    knight_bow4    =[    $kneel4,        knight_bow5    ] {ai_turn();};
  175.  
  176. void()    knight_bow5    =[    $kneel5,        knight_bow5    ] {ai_turn();};
  177.  
  178. void()    knight_bow6    =[    $kneel4,        knight_bow7    ] {ai_turn();};
  179. void()    knight_bow7    =[    $kneel3,        knight_bow8    ] {ai_turn();};
  180. void()    knight_bow8    =[    $kneel2,        knight_bow9    ] {ai_turn();};
  181. void()    knight_bow9    =[    $kneel1,        knight_bow10    ] {ai_turn();};
  182. void()    knight_bow10    =[    $walk1,        knight_walk1    ] {ai_turn();};
  183.  
  184.  
  185.  
  186. void()    knight_die1    =[    $death1,    knight_die2    ] {};
  187. void()    knight_die2    =[    $death2,    knight_die3    ] {};
  188. void()    knight_die3    =[    $death3,    knight_die4    ] 
  189. {};
  190. void()    knight_die4    =[    $death4,    knight_die5    ] {};
  191. void()    knight_die5    =[    $death5,    knight_die6    ] {};
  192. void()    knight_die6    =[    $death6,    knight_die7    ] {};
  193. void()    knight_die7    =[    $death7,    knight_die8    ] {};
  194. void()    knight_die8    =[    $death8,    knight_die9    ] {};
  195. void()    knight_die9    =[    $death9,    knight_die10] {};
  196. void()    knight_die10=[    $death10,    knight_die10] {};
  197.  
  198.  
  199. void()    knight_dieb1    =[    $deathb1,    knight_dieb2    ] {};
  200. void()    knight_dieb2    =[    $deathb2,    knight_dieb3    ] {};
  201. void()    knight_dieb3    =[    $deathb3,    knight_dieb4    ]     
  202. {};
  203. void()    knight_dieb4    =[    $deathb4,    knight_dieb5    ] {};
  204. void()    knight_dieb5    =[    $deathb5,    knight_dieb6    ] {};
  205. void()    knight_dieb6    =[    $deathb6,    knight_dieb7    ] {};
  206. void()    knight_dieb7    =[    $deathb7,    knight_dieb8    ] {};
  207. void()    knight_dieb8    =[    $deathb8,    knight_dieb9    ] {};
  208. v